package cn.platform.mapper;

import cn.platform.entity.Activity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface HarmonyActivityHomeworkMapper {
    /**
     * 根据用户所在班级查询用户班级活动
     *
     * @param classId 班级id
     * @return AResponse res 班级活动
     * @author jyz
     */
    @Select("select content, title, pub_time from jxt_stu_how_act where class_id=#{classId} and type = '活动'")
    List<Activity> getActivity(String classId);

    /**
     * 根据用户所在班级查询用户每日作业
     *
     * @param classId 班级id
     * @return AResponse res 学生作业
     * @author jyz
     */
    @Select("select content, title, subject, deadline, pub_time from jxt_stu_how_act where class_id=#{classId} and type = '作业'")
    List<Activity> getHomework(String classId);
}
